package com.ys.nms.module.business.dal.mysql.vlans;

import java.util.*;

import com.ys.nms.framework.common.pojo.PageResult;
import com.ys.nms.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.ys.nms.framework.mybatis.core.mapper.BaseMapperX;
import com.ys.nms.module.business.dal.dataobject.vlans.VlansDO;
import org.apache.ibatis.annotations.Mapper;
import com.ys.nms.module.business.controller.admin.vlans.vo.*;

/**
 * vlans Mapper
 *
 * @author zzy
 */
@Mapper
public interface VlansMapper extends BaseMapperX<VlansDO> {

    default PageResult<VlansDO> selectPage(VlansPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<VlansDO>()
                .eqIfPresent(VlansDO::getDeviceId, reqVO.getDeviceId())
                .eqIfPresent(VlansDO::getVlanVlan, reqVO.getVlanVlan())
                .likeIfPresent(VlansDO::getVlanName, reqVO.getVlanName())
                .orderByDesc(VlansDO::getVlanId));
    }

}